<template>
	<view class="mine-content">
		<view class="user-info">
			<view class="info-card">
				<view class="info-detail">
					<image src="../../static/index/1.png" mode=""></image>
					<view class="detail-item">
						<view class="tabs-box">
							<view class="isSelect">科目一</view>
							<view>科目四</view>
						</view>
						<view class="grade-box">
							<view class="grade-item">
								<view>0</view>
								<view>累计答题数</view>
								<view>正确率 <text>0.00%</text></view>
							</view>
							<view class="grade-item">
								<view>0</view>
								<view>考试平均分</view>
								<view>累计考试 <text>0次</text></view>
							</view>
							<view class="grade-item">
								<view class="to-test">去考试</view>
								<view>进入模拟考试<br />全新考题冲刺</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="menu-list">
				<view class="menu-item" v-for="(item,index) in menuList" :key="index" @click="gotoNext(item.url)">
					<view class="item-left">
						<image :src="item.image" mode=""></image>
						<view>{{item.name}}</view>
					</view>
					<view class="item-right">
						<view v-if="item.rightText != ''" :class="item.rightTextColor != '1' ? 'color1' : '' ">{{item.rightText}}</view>
						<image src="../../static/index/right.png" mode=""></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menuList: [{
					image: '../../static/index/wtfk.png',
					name: '我的订单',
					url: '/pagesA/myOrder/index',
					rightText: '',
					rightTextColor: ''
				},
				{
					image: '../../static/index/jsrz.png',
					name: '讲师入驻',
					url: '/pagesA/settled/index',
					rightText: '未入驻',
					rightTextColor: 1
				},
				{
					image: '../../static/index/wdsc.png',
					name: '我的收藏',
					url: '/pagesA/questionWrong/index?current=1',
					rightText: '',
					rightTextColor: ''
				},
				{
					image: '../../static/index/zhxx.png',
					name: '账户信息',
					url: '/pagesA/accountInfo/index',
					rightText: '',
					rightTextColor: ''
				},
				{
					image: '../../static/index/gywm.png',
					name: '关于我们',
					url: '/pagesA/aboutUs/index',
					rightText: '',
					rightTextColor: ''
				},
				{
					image: '../../static/index/khzx.png',
					name: '客服咨询',
					url: '',
					rightText: '0851-888888',
					rightTextColor: 2
				},
				{
					image: '../../static/index/wtfk.png',
					name: '问题反馈',
					url: '2',
					rightText: '',
					rightTextColor: ''
				}]
			}
		},
		methods:{
			gotoNext(url){
				uni.navigateTo({
					url
				})
			}
		}
		
	}
</script>

<style lang="scss">
	.color1{
		color: #2AC092;
	}
	.info-card {
		background-color: #2AC092;
		width: 100%;
		height: 200rpx;
		position: relative;

		.info-detail {
			position: absolute;
			position: relative;
			top: 50rpx;
			left: 2%;
			width: 96%;

			>image {
				width: 100%;
				height: 350rpx;
			}

			.detail-item {
				position: absolute;
				top: 0;
				padding: 30rpx;
				width: 100%;

				.tabs-box {
					display: flex;
					border-radius: 50rpx;
					border: 1rpx solid #2AC092;
					width: max-content;
					color: #2AC092;
					overflow: hidden;
					margin-bottom: 50rpx;

					.isSelect {
						background-color: #2AC092;
						color: #fff;
					}

					>view {
						padding: 18rpx 25rpx;
					}

					>view:nth-child(1) {
						border-right: 1rpx solid #2AC092;
					}
				}

				.grade-box {
					display: flex;
					justify-content: space-around;
					align-items: center;

					.grade-item {
						text-align: center;


						>view:nth-child(1) {
							font-size: 36rpx;
						}

						>view:nth-child(2) {
							margin: 20rpx 0;
							font-size: 28rpx;
						}

						>view:last-child {
							font-size: 24rpx;

							>text {
								color: #2AC092;
							}
						}

						.to-test {
							font-size: 26rpx !important;
							background-color: #2AC092;
							color: #fff;
							border-radius: 50rpx;
							padding: 10rpx 25rpx;
						}
					}
				}
			}

		}
	}

	.menu-list {
		width: 96%;
		margin: 230rpx auto;
		border-radius: 10rpx;
		overflow: hidden;
		padding: 0 20rpx;
		background-color: #fff;

		.menu-item {
			padding: 30rpx 10rpx;
			display: flex;
			justify-content: space-between;
			border-bottom: 1px solid #E6E6E6;

			.item-left {
				display: flex;
				font-size: 30rpx;
				align-items: center;
				color: #333;

				>image {
					width: 44rpx;
					height: 44rpx;
					margin-right: 30rpx;
				}
			}

			.item-right {
				display: flex;
				align-items: center;
				font-size: 28rpx;
				color: #333;

				>image {
					width: 30rpx;
					height: 30rpx;
				}
			}
		}
	}
</style>